# -*- coding: UTF-8 -*-
"""
@Project ：swift-forge-engine
@File    ：track_id.py
@IDE     ：PyCharm 
@Author  ：Tony.Gan
@Date    ：2025/1/19 12:08 
@Des     ：
"""
from fastapi import Request

from App.config.conf import settings


def get_request_trace_id(request: Request) -> str:
    return (request.headers.get(settings.TRACE_ID_REQUEST_HEADER_KEY)
            or settings.LOG_CID_DEFAULT_VALUE)
